<template>
	<view class="u-page c-wrap">

		<!-- 		<u-cell-group title="问卷列表1">
			<view v-for="item in sr.list" :data-id="item.id" @click="click">
				<u-cell-item icon="setting-fill" :label="item.demo" :title="item.name" :data-id="item.id"></u-cell-item>
			</view>
			<view style="text-align: center;" v-if="sr.list==null||sr.list.length==0">没有数据</view>
		</u-cell-group> -->
		<!-- 		<view class="c-block">
			<view class="c-title">问卷列表</view>
			<u-list>
				<u-list-item v-for="(item, index) in sr.list" :key="index">
					<u-cell :title="item.name" ></u-cell>
				</u-list-item>
			</u-list>		
			<view style="text-align: center;" v-if="sr.list==null||sr.list.length==0">没有数据</view>
		</view> -->
		<view class="c-block">
			<view class="c-title">列表 List</view>
			<u-cell-group>
				<view v-for="(item, index) in sr.list" :key="index" @click="click" :data-id="item.id" :data-locales="item.locales">
					<u-cell :title="item.name" :isLink="true" arrow-direction="right" ></u-cell>
				</view>
			</u-cell-group>
			<view style="text-align: center;" v-if="sr.list==null||sr.list.length==0">没有数据 No Data</view>
		</view>


	</view>
</template>

<script>
	//import clogin from '@/static/assets/clogin/js/clogin.js'
	import config from "@/config/config.js";
	import xcUniappUtils from '@/library/xcore/js/XcUniappUtils.js';
	import xcViewUtils from '@/library/xcore/js/XcViewUtils.js';
	import xcHttpUtils from '@/library/xcore/js/XcHttpUtils.js';
	import xcCloginUtils from '@/library/xcore/js/XcCloginUtils.js';
	import {
		xsStringUtils,
		xsDateUtils,
		xsArrayUtils
	} from 'xstack-for-javascript';
	export default {
		data() {
			return {
				sr: {
					list: []
				},
			}
		},
		onLoad(options) {
			let that = this;
			
			uni.setNavigationBarTitle({
				title: that.$t('page_paper.title_paperlist')
			})
		},
		onShow() {
			let that = this;
			that.cinit();
		},
		methods: {
			cinit() {
				console.log(111111111111)
				let that = this;
				console.log('ready to load paper list');
				xcHttpUtils.getList(function(res) {
						console.log(22222222222)
				
				});
				// that.$u.c.ajaxget('csmwj/paper/list', {}, function(res) {
				// 	that.sr = res;
				// 	console.log('----------',res);
				// });
			},
			click: function(e) {
				let that = this;
				console.log('click cell',e);
				that.$u.route({
					url: 'pages/csmwj/paper/paper',
					params: {
						id: e.currentTarget.dataset.id,
						locales:e.currentTarget.dataset.locales,
					}
				});
			},
		}
	}
</script>

<style scoped lang="scss">
	.a-top-notice {
		position: fixed;
		left: 0px;
		top: 0px;
		background-color: #9c9c9c;
		color: red;
		line-height: 60rpx;
		font-size: 36rpx;
		text-align: center;
		width: 100%;
		font-weight: bold;
	}

	.a-top-notice-fillblank {
		height: 60rpx;
	}

	.u-radio-group {
		width: 100%;
	}
</style>
